package org.fuys.coder.domain.act.lottery.model.vo.award;

import org.fuys.coder.common.entity.Pair;
import org.springframework.util.ObjectUtils;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.lottery.model.vo.award
 * @className: AwardTypeVO
 * @author: WangJing
 * @description: 奖品类型视图类
 * @date: 2024/7/9 0:23
 * @version: 1.0
 */
public class AwardTypeVO {
    private static Map<Integer, Pair<String,String>> typeMap;

    public static Pair<String,String> getTypeInfo(Integer type){
        return typeMap.get(type);
    }

    public static void setTypeMap(Map<Integer, Pair<String,String>> initMap){
        if(ObjectUtils.isEmpty(initMap)){
            typeMap=new ConcurrentHashMap<>();
        }else{
            typeMap=initMap;
        }
    }
}
